﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Howork
{
    public class RoomInfo
    {
        public int id{get;set;}
        public int capacity{get;set;}
    }

    public class RoomArrange
    {
        private DBAdapter db;
        public RoomArrange()
        {
            db = new DBAdapter();
        }

        public List<RoomInfo> GetFreeRoomList(DateTime begin, DateTime end, int capacity)
        {
            return db.getFreeRoomList(begin, end, capacity);
        }

        public bool ArrangeRoom(DateTime begin, DateTime end, int room_id, string user)
        {
            db.AddRoomUse(room_id,begin,end,user);
            return true;
        }


    }

    
}